package org.Yiran.timetale_re.datagen;

import net.minecraft.core.HolderLookup;
import net.minecraft.core.RegistrySetBuilder;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.PackOutput;
import net.minecraftforge.common.data.DatapackBuiltinEntriesProvider;
import net.minecraftforge.registries.ForgeRegistries;
import org.Yiran.timetale_re.Timetale_re;
import org.Yiran.timetale_re.worldgen.ModBiomeModifierRegister;
import org.Yiran.timetale_re.worldgen.ModConfiguredFeatures;
import org.Yiran.timetale_re.worldgen.ModPlacedFeatures;

import java.util.Set;
import java.util.concurrent.CompletableFuture;

public class ModWorldGenProvider extends DatapackBuiltinEntriesProvider {
    public static final RegistrySetBuilder BUILDER = new RegistrySetBuilder()
            .add(Registries.CONFIGURED_FEATURE, ModConfiguredFeatures::bootstrap)
            .add(Registries.PLACED_FEATURE, ModPlacedFeatures::bootstrap)
            .add(ForgeRegistries.Keys.BIOME_MODIFIERS, ModBiomeModifierRegister::bootstrap);

    public ModWorldGenProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries) {
        super(output, registries, BUILDER, Set.of(Timetale_re.MODID));
        System.out.println("世界生成数据提供器初始化完成");
        System.out.println("已注册以下世界生成内容:");
        System.out.println("  - CONFIGURED_FEATURE (配置特征)");
        System.out.println("  - PLACED_FEATURE (放置特征)");
        System.out.println("  - BIOME_MODIFIERS (生物群系修饰器)");
    }
}